.TH ANIC "1" "January 2010" "ANI Toolchain" "ANI"
.SH NAME
\fBanic\fR \- ANI programming language compiler
.SH SYNOPSIS
.B anic
\fIsourceFile\fR... [-] [-o \fIoutputFile\fR] [-p \fIoptimizationLevel\fR] [-v] [-s] [-t \fItabWidth\fR] [-e] [-h]
.SH DESCRIPTION
.PP
Compile, assemble, and link ANI source code to produce program executables.
.SH OPTIONS
.PP
.TP
\fB\-\fR
read standard input as if it were a source file
.TP
\fB\-o \fR\fIfilename\fR
output the resulting binary to \fR\fIfilename\fR
.IP
If this option is not specified, the default is \fIa.out\fR.
.TP
\fB\-p \fR\fIn\fR
use level \fR\fIn\fR code optimizations during compilation
.IP
The valid range is \fB0\fR to \fB3\fR inclusive, with larger values specifying increasingly more powerful (but also more time-consuming) optimizations.
In general, a larger value means longer compilation times but faster resulting binaries.
If this option is not specified, the default is \fI1\fR.
.TP
\fB\-v\fR
verbose mode; print additional information about the compilation process on standard output
.IP
The additional information includes lexical tokens, parsing transitions, symbol trees, typing information, and resource allocation.
.IP
It is highly recommended to pipe the output of this option to a file or stream viewer, as it can be quite lengthy even for small source programs.
.IP
For example,
.IP
\fBanic \fR\fIprogram.ani\fR\fB \-v | less\fR
.IP
will make viewing the verbose ouput much more manageable.
.IP
Cannot be used with \fB\-s\fR.
.TP
\fB\-s\fR
silent mode; print nothing, not even compilation errors, on any standard output
.IP
Cannot be used with \fB\-v\fR or \fB\-c\fR.
.TP
\fB\-c\fR
color-coded output mode; print additional ANSI CSI control codes on standard and error outputs to make them more readable in a terminal
.IP
Most useful with \fB\-v\fR. Note that these control codes can cause readability problems outside of a terminal context, and that they will usually carry over unfiltered if the outputs are redirected (e.g. to a stream viewer or a file).
.IP
Cannot be used with \fB\-s\fR.
.TP
\fB\-t \fR\fIn\fR\fR
use a tab modulus (width) of \fR\fIn\fR characters
.IP
The valid range is \fB1\fR to \fB80\fR inclusive.
.IP
This option does not affect the compilation process. It simply defines how the compiler reports the column numbers of tokens in the presence of tab characters.
If this option is not specified, the default is \fI4\fR.
.TP
\fB\-e\fR
pedantic error handling; do not to give up on compilation even when encountering confusing or large volumes of errors
.IP
Cannot be used with \fB\-s\fR.
.TP
\fB\-h\fR
program help; display this man page
.IP
Must be the only argument.
.SH EXAMPLES
.TP
\fBanic \fR\fIprogram.ani\fR
Compile, assemble, and link the ANI program in source file
.br
\fIprogram.ani\fR and output the resulting binary to \fIa.out\fR.
.TP
\fBanic \fR\fIprogram.ani\fR\fB \-o \fR\fIprogram\fR
Compile, assemble, and link the ANI program in source file
.br
\fIprogram.ani\fR and output the resulting binary to \fIprogram\fR.
.TP
\fBanic \- \-o \fR\fIprogram\fR
Same as above, except read program source from standard input.
.TP
\fBanic \fR\fIprogram.ani\fR\fB \-v\fR
Compile \fIprogram.ani\fR to \fIa.out\fR and additionally dump verbose compilation details to standard output.
.TP
\fBanic \fR\fIprogram.ani\fR\fB \-p \fR\fI3\fR\fB \-t \fR\fI8\fR\fB \-e \-o \fR\fIprogram\fR
Compile \fIprogram.ani\fR to binary file \fIprogram\fR using level \fI3\fR optimizations, reporting column numbers assuming tabs are \fI8\fR characters wide, and with no limits on the amount of errors reported.
.SH AUTHOR
Written by Kajetan "Adrian" Biedrzycki.
.SH "REPORTING BUGS"
Report bugs to <ani\-compiler@googlegroups.com>.
.SH COPYRIGHT
Copyright (c) 2010 Kajetan "Adrian" Biedrzycki.
.PP
Licensed under GPLv3+ (GNU GPL version 3 or later). See <http://gnu.org/licenses/gpl.html> for details.
.PP
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
The full documentation for \fBanic\fR and the \fBANI\fR programming language is provided on the project home page at <http://anic.googlecode.com>.
